package com.quanyan.operative.mapper;

import com.quanyan.operative.model.resp.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 夺宝Mapper
 * Created by huadongyang on 2016/12/30.
 */
public interface SnatchMapper {
    /**
     * 夺宝商品列表
     * @param type 排序类型
     * @return
     */
    List<RespSnatchGoods> getSnatchGoodsList(@Param("type") Byte type, @Param("pageBegin") Integer pageBegin,@Param("pageSize") Integer pageSize);

    /**
     * 获取夺宝商品名称
     * @param snatchNum 夺宝期号
     * @return
     */
    List<RespBaseGoods> getSnatchBaseGoodsList(Integer snatchNum);

    /**
     * 获取中奖名单
     *
     * @param pageNum
     * @param pageSize
     * @param uid
     * @return
     */
    List<RespSnatchWinningInfo> getWinningInfoList(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize,@Param("uid") Integer uid);

    /**
     * 获取夺宝记录
     * @param uid
     * @param issueID
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<RespSnatchRecordItem> getSnatchRecords(@Param("uid") Integer uid, @Param("issueID") Integer issueID, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    int updateTotalJoin(@Param("issueId") int issueId, @Param("deltaNum") int deltaNum);

}
